Merchant Documents
Merchant Documents
Service ini digunakan untuk melihat dokumen yang telah di upload beserta status dokumen
Service Info
HTTP Method | POST |
---|---|
Service Code | 25 |
Http Method | POST |
Path | .../v1.0/merchant/documents |
Authentication | OAuth 2.0 |
Header
Header Name | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
Content-Type | String | Y | application/json |
X-TIMESTAMP | String | Y | Waktu lokal klien saat ini yyyy-MM-ddTHH:mm:ss.SSSTZD format |
X-PARTNER-ID | String | Y | Client’s client_id (diberikan pada saat onboarding ) |
X-CHANNEL-ID | String | Y | ID channel merchant |
X-SIGNATURE | String | Y | Dibuat dengan algoritma asymmetric with token : Signature Generation |
X-EXTERNAL-ID | String | Y | ID external merchant (tidak boleh sama di hari yang sama) |
Body
Nama Field | Tipe Data | Wajib | Deskripsi |
---|---|---|---|
merchantId | String | Y | Kode Unik Setiap Merchant |
- JSON
- CURL
- PHP
- NODE JS
- GO
{
"merchantId" : "121xxxx"
};
curl --location --request POST '../v1.0/merchant/documents' \
--header 'x-client-key: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc' \
--header 'x-timestamp: 2024-01-16T10:54:21+07:00' \
--header 'x-signature: qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==' \
--header 'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc' \
--header 'channel-id: 23412' \
--header 'x-external-id: 2024-05-15T06:56:02.642Z' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5' \
--data-raw '{
"merchantId" : "121xxxx"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '../v1.0/merchant/documents',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"merchantId" : "121xxxx"
}',
CURLOPT_HTTPHEADER => array(
'x-client-key: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'x-timestamp: 2024-01-16T10:54:21+07:00',
'x-signature: qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==',
'x-partner-id: 6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'channel-id: 23412',
'x-external-id: 2024-05-15T06:56:18.301Z',
'Content-Type: application/json',
'Authorization: Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'POST',
'url': '../v1.0/merchant/documents',
'headers': {
'x-client-key': '6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'x-timestamp': '2024-01-16T10:54:21+07:00',
'x-signature': 'qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==',
'x-partner-id': '6c57db4e-9e11-4951-9bcf-d6f177dafbcc',
'channel-id': ' 23412',
'x-external-id': '2024-05-15T06:56:45.081Z',
'Content-Type': ' application/json',
'Authorization': 'Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5'
},
body: '{
"merchantId" : "121xxxx"
}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "../v1.0/merchant/documents"
method := "POST"
payload := strings.NewReader(`{
"merchantId" : "121xxxx"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-client-key", "6c57db4e-9e11-4951-9bcf-d6f177dafbcc")
req.Header.Add("x-timestamp", "2024-01-16T10:54:21+07:00")
req.Header.Add("x-signature", "qrQQSSkvCXxYE3MWJpsn+loHuh4+1xlNWEF6oKmqJgbBJHYqnYoBAYgsv/+DXC7dMeGgdu2dkbXBuMQUD/cGZQ==")
req.Header.Add("x-partner-id", "6c57db4e-9e11-4951-9bcf-d6f177dafbcc")
req.Header.Add("channel-id", " 23412")
req.Header.Add("x-external-id", "2024-05-15T06:57:04.004Z")
req.Header.Add("Content-Type", " application/json")
req.Header.Add("Authorization", "Bearer 6430fe8b-79d5-4e58-a337-6eb498e117a5")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Response
Parameter | Tipe Data | Deskripsi |
---|---|---|
responseCode | String | Kode response |
responseMessage | String | Pesan response |
additionalInfo | Array Of Object | Informasi tambahan. |
type | String | tipe dokumen selfie - foto selfie no_mpwp - nomor npwp npwp - foto npwp no_ktp - nomor nik ktp - foto ktp toko1,toko2,toko3 - foto toko |
value | String | Url Dokumen yang telah di upload |
status | Integer | Status dokumen -1 - data kadaluarsa 0 - data dalam proses 1 - data diterima 2 - data ditolak |
title | String | Informasi title wording status dokumen |
description | String | Informasi Deskripsi wording status dokumen |
{
"responseCode": "2002500",
"responseMessage": "Successful",
"additionalInfo": [
{
"type": "toko1",
"value": ".../images/merchant/4fe7-9994-a9c2cf7105dc.jpg",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "toko2",
"value": ".../images/merchant/3212-4412-512421321.jpg",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "toko3",
"value": ".../images/merchant/0192-2019-928462718.jpg",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "ktp",
"value": ".../images/merchant/9929-2012-291827421.jpg",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "no_ktp",
"value": "94649949494",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "npwp",
"value": ".../images/merchant/9002-0299-28102931.jpg",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "no_npwp",
"value": "123123213",
"status": 1,
"title": "Selamat Data Anda Telah Diterima",
"description": "Silahkan Nikmati Berbagi Macam Fitur Di Aplikasi SpeedCash Merchant"
},
{
"type": "selfie",
"value": ".../images/merchant/9162-8277-29208652.jpg",
"status": 2,
"title": "Data foto [kartu identitas/selfie] [kurang jelas/kabur/tidak sesuai]",
"description": "Mohon perbaiki dan ulangi ya, kak. Team CS kami dengan senang hati akan bantu kakak jika kesulitan "
}
]
}
List Response Code
Response Code | Response Message | Description |
---|---|---|
2002500 | Success | |
4002501 | Invalid field format { field name } | |
4012500 | Unauthorized. Invalid Signature | X-Signature salah |
4092500 | Cannot use same X-EXTERNAL-ID in same day | X-External-ID sudah pernah digunakan di hari yang sama |
4042501 | Bad Request | Request header ada yang salah / kurang |
4042500 | Unauthorized. Client Forbidden Access API | Partner tidak dapat mengakses api terkait |
4002501 | Request Failed | Terjadi kesalahan |